<script setup>
import { getCurrentInstance, onMounted } from "vue"
import classificationImgs from "./classificationImgs";
import tempImgs from "./tempImgs";
const { proxy } = getCurrentInstance()
const _window_height = window.innerHeight
onMounted(() => {
    proxy.$refs.fullPage.style.height = _window_height + "px"
})
</script>
<template>
    <div class="full-page" ref="fullPage">
        <div class="tc-header">
            <!-- 首页头部 -->
            <div class="tc-top-header">
                <div class="tc-header-logo-container">
                    <div class="tc-logo">
                        <img src="../../../src/assets/imgs/tc-logo.png" alt="">
                    </div>
                    <div class="tc-log-title">
                        <span>传统文化宣传网站</span>
                    </div>
                </div>
                <div class="tc-header-tools">
                    <div class="search">
                        <i class="iconfont icon-sousuo"></i>
                    </div>
                    <div class="user">
                        <i class="iconfont icon-yonghu"></i>
                    </div>
                    <div class="calendar">
                        <span class="now-date">2025-02-10</span>
                        <span class="now-week">星期一</span>
                        <span class="chinese-calendar">农历正月十三</span>
                    </div>
                </div>
            </div>
            <!-- 首页导航 -->
            <div class="tc-nav-mod">
                <ul class="nav-lv">
                    <li class="nav-item">
                        <div class="nav-tit">首页</div>
                    </li>
                    <li class="nav-item">
                        <div class="nav-tit">机构</div>
                    </li>
                    <li class="nav-item">
                        <div class="nav-tit">政策</div>
                    </li>
                    <li class="nav-item">
                        <div class="nav-tit">文章</div>
                    </li>
                    <li class="nav-item">
                        <div class="nav-tit">课程</div>
                    </li>
                </ul>
            </div>
        </div>

        <!-- 轮播图 -->
        <div class="home1">
            <a-carousel>
                <div>
                    <img src="../../assets/imgs/swiper_1.jpg" alt="">
                </div>
                <div>
                    <img src="../../assets/imgs/swiper_2.jpg" alt="">
                </div>
                <div>
                    <img src="../../assets/imgs/swiper_3.jpg" alt="">
                </div>
                <div>
                    <img src="../../assets/imgs/swiper_4.jpg" alt="">
                </div>
            </a-carousel>
        </div>

        <!-- 文化分类 -->
        <div class="home2 pos_r">
            <div class="tc-classification-bc" v-for="(item, index) in classificationImgs" :key="index"
                :style='[{ backgroundImage: `url("${item}")` }]'></div>
            <div class="tc-classification-content pos_a_0_0">
                <div class="tc-classification-tit">
                    <i class="iconfont icon-gufengxiangyunyunduo28-copy"></i>
                    <span class="tc-classification-text">传统文化代表性分类</span>
                    <i class="iconfont icon-gufengxiangyunyunduo28"></i>
                </div>
                <div class="tc-classification-list">
                    <div class="tc-classification-item" v-for="(item, index) in tempImgs" :key="index">
                        <div class="tc-classification-item-content pos_r"
                            :style='[{ backgroundImage: `url("${item}")` }]'>
                            <div class="img">
                                <img src="../../assets/imgs/tc1.png">
                            </div>
                            <div class="tit pos_a">【标题】</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!--  -->
        <div class="home3">
            <div class="row">
                <div class="col overHide">
                    <div class="box">
                        <div class="head">
                            <div class="tit">
                                <i class="iconfont icon-gujiantou-left"></i>
                                <span>新闻动态</span>
                                <i class="iconfont icon-gujiantou-right"></i>
                            </div>
                            <div class="more">
                                <router-link to="">
                                    <i class="iconfont icon-bianjiao-left"></i>
                                    更多
                                    <i class="iconfont icon-bianjiao-right"></i>
                                </router-link>
                            </div>
                        </div>
                        <div class="news-img">
                            <img src="" alt="">
                            <div class="news-img-tit text-ellipsis">标题</div>
                        </div>
                        <div class="news-list">
                            <div class="news-item fs16">
                                <router-link to="" class="news-tit text-ellipsis">新闻标题</router-link>
                                <div class="news-time">2025-02-12</div>
                            </div>
                            <div class="news-item fs16">
                                <router-link to="" class="news-tit text-ellipsis">新闻标题</router-link>
                                <div class="news-time">2025-02-12</div>
                            </div>

                            <div class="news-item fs16">
                                <router-link to="" class="news-tit text-ellipsis">新闻标题</router-link>
                                <div class="news-time">2025-02-12</div>
                            </div>
                            <div class="news-item fs16">
                                <router-link to="" class="news-tit text-ellipsis">新闻标题</router-link>
                                <div class="news-time">2025-02-12</div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col overHide">
                    <div class="box">
                        <div class="head">
                            <div class="tit">
                                <i class="iconfont icon-gujiantou-left"></i>
                                <span>论坛</span>
                                <i class="iconfont icon-gujiantou-right"></i>
                            </div>
                            <div class="more">
                                <router-link to="">
                                    <i class="iconfont icon-bianjiao-left"></i>
                                    更多
                                    <i class="iconfont icon-bianjiao-right"></i>
                                </router-link>
                            </div>
                        </div>
                        <div class="forum-list">
                            <div class="forum-item">
                                <router-link to="">
                                    <div class="forum-tit fs16 text-ellipsis">熊威：德昂族春节的兴起与中华文化认同</div>
                                    <div class="forum-content text-ellipsis-2">
                                        【摘要】春节在德昂族聚居区兴起，并逐渐成为德昂族节日体系的重要组成部分，本质上是礼俗互动的结果，形成了既符合传...</div>
                                </router-link>
                                <div class="forum-time">2025-02-13</div>
                            </div>
                            <div class="forum-item">
                                <router-link to="">
                                    <div class="forum-tit fs16 text-ellipsis">熊威：德昂族春节的兴起与中华文化认同</div>
                                    <div class="forum-content text-ellipsis-2">
                                        【摘要】春节在德昂族聚居区兴起，并逐渐成为德昂族节日体系的重要组成部分，本质上是礼俗互动的结果，形成了既符合传...</div>
                                </router-link>
                                <div class="forum-time">2025-02-13</div>
                            </div>
                            <div class="forum-item">
                                <router-link to="">
                                    <div class="forum-tit fs16 text-ellipsis">熊威：德昂族春节的兴起与中华文化认同</div>
                                    <div class="forum-content text-ellipsis-2">
                                        【摘要】春节在德昂族聚居区兴起，并逐渐成为德昂族节日体系的重要组成部分，本质上是礼俗互动的结果，形成了既符合传...</div>
                                </router-link>
                                <div class="forum-time">2025-02-13</div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col overHide">
                    <div class="box">
                        <div class="head">
                            <div class="tit">
                                <i class="iconfont icon-gujiantou-left"></i>
                                <span>专题报道</span>
                                <i class="iconfont icon-gujiantou-right"></i>
                            </div>
                            <div class="more">
                                <router-link to="">
                                    <i class="iconfont icon-bianjiao-left"></i>
                                    更多
                                    <i class="iconfont icon-bianjiao-right"></i>
                                </router-link>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<style lang="less" scoped>
.full-page {
    position: relative;

    .tc-header {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 130px;
        background-color: rgba(0, 0, 0, .2);
        z-index: 2;

        .tc-top-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 76px;
            padding: 0 65px;

            .tc-header-logo-container {
                width: 50%;
                display: flex;
                align-items: center;

                .tc-logo {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }

                .tc-log-title {
                    font-size: 18px;
                    margin-left: 20px;
                }
            }

            .tc-header-tools {
                flex: 1;
                display: flex;
                justify-content: flex-end;
                gap: 10px;

                .search,
                .user {
                    width: 30px;
                    height: 30px;
                    text-align: center;
                    line-height: 30px;
                }

                .calendar {
                    display: flex;
                    gap: 5px;
                    line-height: 30px;
                }
            }
        }

        .tc-nav-mod {
            display: flex;
            justify-content: center;
            border-top: 1px solid #ccc;

            .nav-lv {
                display: flex;
                flex-direction: row;
                font-size: 20px;

                .nav-item {
                    .nav-tit {
                        width: 64px;
                        line-height: 54px;
                        text-align: center;
                        margin: 0 38px;
                    }
                }
            }
        }
    }

    .home1 {
        height: inherit;

        .ant-carousel {
            height: inherit;

            /deep/ .slick-slider,
            /deep/ .slick-list,
            /deep/ .slick-list * {
                height: inherit;
                overflow: hidden;
            }

            /deep/ .slick-dots-bottom {
                bottom: 50px;
            }
        }

        img {
            width: 100%;
            height: inherit;
        }
    }

    .home2 {
        position: relative;
        height: inherit;

        .tc-classification-bc {
            height: inherit;
            width: 4.166667%;
            float: left;
        }

        .tc-classification-content {
            display: flex;
            align-items: center;
            width: 100%;
            height: inherit;
            padding: 0 4.166667%;

            .tc-classification-tit {
                display: flex;
                align-items: center;
                width: 4.166667%;
                font-size: 30px;
                writing-mode: tb-rl;

                .tc-classification-text {
                    padding: 10px 0;
                }
            }

            .tc-classification-list {
                flex: 1;
                height: inherit;
                display: grid;
                grid-template-columns: 20% 20% 20% 20% 20%;
                grid-template-rows: 50% 50%;

                .tc-classification-item {
                    display: flex;
                    align-items: center;
                    justify-content: center;

                    .tc-classification-item-content {
                        width: 60%;
                        height: 70%;
                        background-size: contain;
                        background-repeat: round;
                        text-align: center;

                        .img {
                            margin-top: 15px;
                        }

                        .tit {
                            width: 100%;
                            font-size: 18px;
                            bottom: 20px;
                            left: 50%;
                            transform: translate(-50%, -50%);
                        }
                    }
                }
            }
        }
    }

    .home3 {
        height: inherit;
        background: url(../../assets/imgs/home3_bc.jpg);
        background-size: cover;

        a:hover {
            color: #9a2929;
        }

        .row {
            display: flex;
            height: inherit;
            align-items: center;
            justify-content: center;

            .col {
                width: 27%;
                height: 553px;

                .box {
                    color: #333 !important;
                    margin: 0 8%;

                    .head {
                        display: flex;
                        justify-content: space-between;
                        margin-bottom: 14%;

                        .tit {
                            font-size: 30px;

                            .iconfont {
                                font-size: 30px !important;
                            }

                            span {
                                padding: 0 12px;
                            }
                        }

                        .more {
                            display: flex;
                            align-items: flex-end;

                            .iconfont {
                                font-size: 14px !important;
                            }

                            a {
                                padding: 0 4px;
                            }

                        }


                    }

                    .news-img {
                        position: relative;
                        height: 248px;
                        background-color: #ccc;

                        .news-img-tit {
                            position: absolute;
                            color: #fff;
                            background-color: rgba(0, 0, 0, .2);
                            bottom: 0;
                            width: 100%;
                            font-size: 16px;
                            padding: 20px;
                        }
                    }

                    .news-list {
                        padding: 37px 0 21px;
                        border-bottom: 1px dashed #b5b5b5;

                        .news-item {
                            display: flex;
                            line-height: 1.2;

                            .news-tit {
                                flex: 1;
                            }

                            .news-time {
                                width: 71px;
                                margin-left: 20px;
                            }

                            &+.news-item {
                                margin-top: 11px;
                            }
                        }
                    }

                    .forum-list {
                        .forum-item {
                            padding-bottom: 25px;
                            border-bottom: 1px dashed #b5b5b5;

                            .forum-tit {
                                margin-bottom: 10px;

                            }

                            .forum-content {
                                height: 42px;
                                margin-bottom: 15px;
                            }

                            .forum-time {
                                font-family: Arial;
                                color: #333;
                            }

                            &+ .forum-item {
                                margin-top: 28px;
                            }
                        }
                    }
                }
            }
        }

    }
}
</style>
